Skip to main content

WindowObj

Wolfram Kernel
Execution environment
Notebook`Editor`Kernel`FrontSubmitService`
Context
WindowObj[assoc_Association]

an internal representation of a current window (can be a notebook or projected cell), that contains the information of a live connection to it used by FrontSubmit, FrontFetch, Slides and other functions.

It is produced by CurrentWindow.

Methods

EventHandler

You can attach an event listener to it. The following patterns are supported

  • "Closed" - fires, when a windows has been closed

It returns a wrapper for EventObject generated from the events of the given window. You can apply EventRemove on it to remove all handlers.

example

test = {0,1,0};

EventHandler[CurrentWindow[], {"Closed" -> Function[Null,
test = {1,0,0};
]}];

Graphics[{RGBColor[test // Offload], Disk[{0,0}, 1]}]

Try to reopen a window (reload) a disk must turn red.